<template>
  <!-- 高亮功能  -->
  <footer>
    <div class="footer-bottom">
      <span v-for='(item,index) in footerArr' :key="index" @click='qiehuan(index)' :class="{active:footerCurrent == index}">
        {{item}}
      </span>
    </div>
  </footer>

</template>

<script>

export default {
 
  data() {
    return {
      footerCurrent: 1,
      footerArr: ['首页', '爆爆团', '订单', '我的']
    }
  },
  methods: {
    qiehuan(index) {
      this.footerCurrent = index
    },

  },
}
</script>

<style lang='scss' scoped>
footer {
  border-top: 1px solid gray;
  width: 100%;
  height: 40px;
  background-color: #fff;
  position: fixed;
  bottom: 0;

  .footer-bottom {
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    font-size: 18px;

    .active {
      color: red;
    }
  }
}
</style>